<template>
  <div id="iLogo">
    <router-link to="/home">
      <img src="../assets/images/cr18g/logo.jpg">
      <span v-if="!isSmall">{{name}}</span>
    </router-link>
  </div>
</template>

<script>
export default {
  name: 'iLogo',
  props:{
    isSmall: {
      type: Boolean,
      default: false
    }
  },
  data() {
    return {
      name: ''
    }
  },
  created() {
    this.name = this.$store.state.appName
  }
}
</script>

<style lang="scss" scoped>
#iLogo{
  width: 100%;
  height: 100%;

  a{
    transition: all 0.2s ease-in-out;
    width: 100%;
    height: 100%;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 22px;
    
    img{
      height: 80%;
    }

    span{
      margin-left: 10px;
      white-space: nowrap;
    }
  }
}
</style>